{extend name='public/layout' /}
{block name='content'}
<script src="__JS__/amazeui.min.js"></script>
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{"directionNav":false}' >
    <ul class="am-slides">
        {volist name='info.file' id='vo'}
        <li><img src="{$vo.url}" /></li>
        {/volist}
    </ul>
</div>

<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">{$info.title}</span></h1>
    <ul class="data">
        <li class="w5"><label>小区：</label><a href="{:url('Xiaoqu/detail',['id'=>$info['estate_id']])}">{$info.estate_name}</a></li>
        <li class="w5"><label>总价：</label>{$info.total_price}万</li>
        <li class="w5"><label>单价：</label>{$info.price}元/㎡</li>
        <li class="w5"><label>装修：</label>{$zhuangxiu}</li>
        <li class="w5"><label>面积：</label>{$info.mianji}㎡</li>
        <li class="w5"><label>楼层：</label>{$info.floor}层/共{$info.total_floor}层</li>
        <li class="w5"><label>朝向：</label>{$chaoxiang}</li>
        <li class="w5"><label>年代：</label>{$info.niandai}年</li>
        <li><label>户型：</label>{$info.room}室{$info.ting}厅{$info.wei}卫{$info.chu}厨{$info.yang}阳台</li>
        <li><label>地址：</label>{$info.address}</li>
    </ul>
</div>

<div class="div_box03">
    <div class="pageInfo">
        <h1 class="h1_title"><span class="h1_title_t">房源描述</span></h1>
        <div style="padding: 10px;">{$info.info}</div>
    </div>
</div>
<div class="div_box03">
    <div class="pageInfo">
    <h1 class="h1_title"><span class="h1_title_t">房源图片</span></h1>
    <div class="second_img overflow_h">
        <ul class="pic_box">
            {volist name='info.file' id='vo'}
            <li><a href="{$vo.url}"><img src="{$vo.url}" /></a></li>
            {/volist}
        </ul>
    </div>
    </div>
</div>

<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t">小区简介</span></h1>
    <div class="iocation overflow_h">
        {$estate}
    </div>
</div>
<div class="div_box03">
    <div class="h_s_n3_t"><h1 class="h1_title"><span class="h1_title_t">预约看房</span></h1></div>
    <div class="pageSignUp">
        <dl>
            <dt>看房热线（24小时服务）<em>全程免费接机安排</em></dt>
            <dd><b>{$info.contact_phone}</b></dd>
        </dl>
        <form action="{:url('Ajax/addOrder')}" method="post" id="form">
        <ul>
            <li class="pageSignUp_ico16"><input type="text" placeholder="您的称呼" required="" class="itext" id="name" name="name"></li>
            <li class="pageSignUp_ico17"><input type="text" placeholder="您的手机号码" required="" class="itext" id="phone" name="phone"></li>
            <p><a href="javascript:;" class="but03" id="baoming_btn">提交预约</a></p>
            <input type="hidden" value="second_house" name="model" id="model">
            <input type="hidden" value="1" name="type" id="type">
            <input type="hidden" value="{$info.id}" name="house_id" id="house_id">
        </ul>
        </form>
    </div>
</div>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/plugins/jquery.ajax.form.js"></script>
<link href="__PUBLIC__/js/photoswipe/css/photoswipe.css" rel="stylesheet" />
<script src="__PUBLIC__/js/photoswipe/js/klass.min.js"></script>
<script src="__PUBLIC__/js/photoswipe/js/photoswipe.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var myPhotoSwipe = $(".pic_box a").photoSwipe({
            enableMouseWheel: false,
            enableKeyboard: false,
            captionAndToolbarAutoHideDelay: 0
        });
    });
</script>
<script>
    $(function(){
        $('#baoming_btn').on('click',function(){
            var name = $.trim($('#name').val()),phone = $('#phone').val(),reg = /^1[34578][0-9]{9}$/;
            if(name.length == 0){
                layer.msg('请填写您的姓名',{icon:2});
                return false;
            }
            if(!reg.test(phone)){
                layer.msg('请填写正确的手机号码',{icon:2});
                return false;
            }
            layer.load(1);
            $('#form').submit();
        });
    });

    $('#form').ajaxForm({success:complate,dataType:'json'});
    function complate(result){
        layer.closeAll();
        if(result.status == 1){
            layer.msg(result.msg,{icon:1});
            $('#name').val(' ');
            $('#phone').val(' ');
        } else {
            layer.msg(result.msg,{icon:2});
        }
    }
</script>
{/block}